package main

import (
	"time"
)

func main()  {
	// 查询 5天 没有结算信息的商户
//	dingo.InitViper("./configs/admin.yaml")
//	dbs.NewMysqlComponent().Step()
//
//	var lst []*placeresp.GetPlaceIdWithHotelIdModel
//	global.Orm.Table("places").Find(&lst)
//
//	for _,l := range lst {
//		var total int64
//		m := &dividendslog.DividendsLog{}
//		sql := `select IFNULL(SUM(money),0) as total from agent_settlog_test WHERE user_id = ?
//and DATE_FORMAT(update_date,'%Y-%m-%d') >= '2020-12-01'
//and DATE_FORMAT(update_date,'%Y-%m-%d') <= '2020-12-25'`
//
//		global.Orm.Model(m).
//			Raw(sql, l.UserID).
//			Pluck("IFNULL(SUM(money),0) as total", &total)
//
//
//		if total <= 0 && l.DeviceCount > 0 {
//			log.Println(l.Id,l.PlaceName,FormatIntTime(int64(l.CreateAt)),l.DeviceCount)
//		}
//
//
//	}



}

func FormatIntTime(timeStamp int64) string {
	//返回time对象
	t := time.Unix(timeStamp, 0)
	//返回string
	dateStr := t.Format("2006-01-02 15:04:05")
	return dateStr
}
